home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / doom / quake2.zip / TF1_2SRC.ZIP / QUAKE / FORTRESS / SOURCE / DEFS.QC < prev    next >
Text File  |  1996-09-09  |  41KB  |  1,214 lines

  1.  
  2. /*
  3. ==============================================================================
  4.  
  5.             SOURCE FOR GLOBALVARS_T C STRUCTURE
  6.  
  7. ==============================================================================
  8. */
  9.  
  10. //
  11. // system globals
  12. //
  13. entity        self;
  14. entity        other;
  15. entity        world;
  16. float        time;
  17. float        frametime;
  18.  
  19. float        force_retouch;        // force all entities to touch triggers
  20.                                 // next frame.  this is needed because
  21.                                 // non-moving things don't normally scan
  22.                                 // for triggers, and when a trigger is
  23.                                 // created (like a teleport trigger), it
  24.                                 // needs to catch everything.
  25.                                 // decremented each frame, so set to 2
  26.                                 // to guarantee everything is touched
  27. string        mapname;
  28.  
  29. float        deathmatch;
  30. float        coop;
  31. float        teamplay;
  32.  
  33. float        serverflags;        // propagated from level to level, used to
  34.                                 // keep track of completed episodes
  35.  
  36. float        total_secrets;
  37. float        total_monsters;
  38.  
  39. float        found_secrets;        // number of secrets found
  40. float        killed_monsters;    // number of monsters killed
  41.  
  42.  
  43. // spawnparms are used to encode information about clients across server
  44. // level changes
  45. float        parm1, parm2, parm3, parm4, parm5, parm6, parm7, parm8, parm9, parm10, parm11, parm12, parm13, parm14, parm15, parm16;
  46.  
  47. //
  48. // global variables set by built in functions
  49. //    
  50. vector        v_forward, v_up, v_right;    // set by makevectors()
  51.     
  52. // set by traceline / tracebox
  53. float        trace_allsolid;
  54. float        trace_startsolid;
  55. float        trace_fraction;
  56. vector        trace_endpos;
  57. vector        trace_plane_normal;
  58. float        trace_plane_dist;
  59. entity        trace_ent;
  60. float        trace_inopen;
  61. float        trace_inwater;
  62.  
  63. entity        msg_entity;                // destination of single entity writes
  64.  
  65. //
  66. // required prog functions
  67. //
  68. void()         main;                        // only for testing
  69.  
  70. void()        StartFrame;
  71.  
  72. void()         PlayerPreThink;
  73. void()         PlayerPostThink;
  74.  
  75. void()        ClientKill;
  76. void()        ClientConnect;
  77. void()         PutClientInServer;        // call after setting the parm1... parms
  78. void()        ClientDisconnect;
  79.  
  80. void()        SetNewParms;            // called when a client first connects to
  81.                                     // a server. sets parms so they can be
  82.                                     // saved off for restarts
  83.  
  84. void()        SetChangeParms;            // call to set parms for self so they can
  85.                                     // be saved for a level transition
  86.  
  87.  
  88. //================================================
  89. void        end_sys_globals;        // flag for structure dumping
  90. //================================================
  91.  
  92. /*
  93. ==============================================================================
  94.  
  95.             SOURCE FOR ENTVARS_T C STRUCTURE
  96.  
  97. ==============================================================================
  98. */
  99.  
  100. //
  101. // system fields (*** = do not set in prog code, maintained by C code)
  102. //
  103. .float        modelindex;        // *** model index in the precached list
  104. .vector        absmin, absmax;    // *** origin + mins / maxs
  105.  
  106. .float        ltime;            // local time for entity
  107. .float        movetype;
  108. .float        solid;
  109.  
  110. .vector        origin;            // ***
  111. .vector        oldorigin;        // ***
  112. .vector        velocity;
  113. .vector        angles;
  114. .vector        avelocity;
  115.  
  116. .vector        punchangle;        // temp angle adjust from damage or recoil
  117.  
  118. .string        classname;        // spawn function
  119. .string        model;
  120. .float        frame;
  121. .float        skin;
  122. .float        effects;
  123.  
  124. .vector        mins, maxs;        // bounding box extents reletive to origin
  125. .vector        size;            // maxs - mins
  126.  
  127. .void()        touch;
  128. .void()        use;
  129. .void()        think;
  130. .void()        blocked;        // for doors or plats, called when can't push other
  131.  
  132. .float        nextthink;
  133. .entity        groundentity;
  134.  
  135. // stats
  136. .float        health;
  137. .float        frags;
  138. .float        weapon;            // one of the IT_SHOTGUN, etc flags
  139. .string        weaponmodel;
  140. .float        weaponframe;
  141. .float        currentammo;
  142. .float        ammo_shells, ammo_nails, ammo_rockets, ammo_cells;
  143.  
  144. .float        items;            // bit flags
  145.  
  146. .float        takedamage;
  147. .entity        chain;
  148. .float        deadflag;
  149.  
  150. .vector        view_ofs;            // add to origin to get eye point
  151.  
  152.  
  153. .float        button0;        // fire
  154. .float        button1;        // use
  155. .float        button2;        // jump
  156.  
  157. .float        impulse;        // weapon changes
  158.  
  159. .float        fixangle;
  160. .vector        v_angle;        // view / targeting angle for players
  161. .float        idealpitch;        // calculated pitch angle for lookup up slopes
  162.  
  163.  
  164. .string        netname;
  165.  
  166. .entity     enemy;
  167.  
  168. .float        flags;
  169.  
  170. .float        colormap;
  171. .float        team;
  172.  
  173. .float        max_health;        // players maximum health is stored here
  174.  
  175. .float        teleport_time;    // don't back up
  176.  
  177. .float        armortype;        // save this fraction of incoming damage
  178. .float        armorvalue;
  179.  
  180. .float        waterlevel;        // 0 = not in, 1 = feet, 2 = wast, 3 = eyes
  181. .float        watertype;        // a contents value
  182.  
  183. .float        ideal_yaw;
  184. .float        yaw_speed;
  185.  
  186. .entity        aiment;
  187.  
  188. .entity     goalentity;        // a movetarget or an enemy
  189.  
  190. .float        spawnflags;
  191.  
  192. .string        target;
  193. .string        targetname;
  194.  
  195. // damage is accumulated through a frame. and sent as one single
  196. // message, so the super shotgun doesn't generate huge messages
  197. .float        dmg_take;
  198. .float        dmg_save;
  199. .entity        dmg_inflictor;
  200.  
  201. .entity        owner;        // who launched a missile
  202. .vector        movedir;    // mostly for doors, but also used for waterjump
  203.  
  204. .string        message;        // trigger messages
  205.  
  206. .float        sounds;        // either a cd track number or sound number
  207.  
  208. .string        noise, noise1, noise2, noise3;    // contains names of wavs to play
  209.  
  210. //================================================
  211. void        end_sys_fields;            // flag for structure dumping
  212. //================================================
  213.  
  214. /*
  215. ==============================================================================
  216.  
  217.                 VARS NOT REFERENCED BY C CODE
  218.  
  219. ==============================================================================
  220. */
  221.  
  222.  
  223. //
  224. // constants
  225. //
  226.  
  227. float    FALSE                    = 0;
  228. float     TRUE                    = 1;
  229.  
  230. // edict.flags
  231. float    FL_FLY                    = 1;
  232. float    FL_SWIM                    = 2;
  233. float    FL_CLIENT                = 8;    // set for all client edicts
  234. float    FL_INWATER                = 16;    // for enter / leave water splash
  235. float    FL_MONSTER                = 32;
  236. float    FL_GODMODE                = 64;    // player cheat
  237. float    FL_NOTARGET                = 128;    // player cheat
  238. float    FL_ITEM                    = 256;    // extra wide size for bonus items
  239. float    FL_ONGROUND                = 512;    // standing on something
  240. float    FL_PARTIALGROUND        = 1024;    // not all corners are valid
  241. float    FL_WATERJUMP            = 2048;    // player jumping out of water
  242. float    FL_JUMPRELEASED            = 4096;    // for jump debouncing
  243.  
  244. // edict.movetype values
  245. float    MOVETYPE_NONE            = 0;    // never moves
  246. //float    MOVETYPE_ANGLENOCLIP    = 1;
  247. //float    MOVETYPE_ANGLECLIP        = 2;
  248. float    MOVETYPE_WALK            = 3;    // players only
  249. float    MOVETYPE_STEP            = 4;    // discrete, not real time unless fall
  250. float    MOVETYPE_FLY            = 5;
  251. float    MOVETYPE_TOSS            = 6;    // gravity
  252. float    MOVETYPE_PUSH            = 7;    // no clip to world, push and crush
  253. float    MOVETYPE_NOCLIP            = 8;
  254. float    MOVETYPE_FLYMISSILE        = 9;    // fly with extra size against monsters
  255. float    MOVETYPE_BOUNCE            = 10;
  256. float    MOVETYPE_BOUNCEMISSILE    = 11;    // bounce with extra size
  257.  
  258. // edict.solid values
  259. float    SOLID_NOT                = 0;    // no interaction with other objects
  260. float    SOLID_TRIGGER            = 1;    // touch on edge, but not blocking
  261. float    SOLID_BBOX                = 2;    // touch on edge, block
  262. float    SOLID_SLIDEBOX            = 3;    // touch on edge, but not an onground
  263. float    SOLID_BSP                = 4;    // bsp clip, touch on edge, block
  264.  
  265. // range values
  266. float    RANGE_MELEE                = 0;
  267. float    RANGE_NEAR                = 1;
  268. float    RANGE_MID                = 2;
  269. float    RANGE_FAR                = 3;
  270.  
  271. // deadflag values
  272.  
  273. float    DEAD_NO                    = 0;
  274. float    DEAD_DYING                = 1;
  275. float    DEAD_DEAD                = 2;
  276. float    DEAD_RESPAWNABLE        = 3;
  277.  
  278. // takedamage values
  279.  
  280. float    DAMAGE_NO                = 0;
  281. float    DAMAGE_YES                = 1;
  282. float    DAMAGE_AIM                = 2;
  283.  
  284. // items
  285. float    IT_AXE                    = 4096;
  286. float    IT_SHOTGUN                = 1;
  287. float    IT_SUPER_SHOTGUN        = 2;
  288. float    IT_NAILGUN                = 4;
  289. float    IT_SUPER_NAILGUN        = 8;
  290. float    IT_GRENADE_LAUNCHER        = 16;
  291. float    IT_ROCKET_LAUNCHER        = 32;
  292. float    IT_LIGHTNING            = 64;
  293. float    IT_EXTRA_WEAPON            = 128;
  294.  
  295. float    IT_SHELLS                = 256;
  296. float    IT_NAILS                = 512;
  297. float    IT_ROCKETS                = 1024;
  298. float    IT_CELLS                = 2048;
  299.  
  300. float    IT_ARMOR1                = 8192;
  301. float    IT_ARMOR2                = 16384;
  302. float    IT_ARMOR3                = 32768;
  303. float    IT_SUPERHEALTH            = 65536;
  304.  
  305. float    IT_KEY1                    = 131072;
  306. float    IT_KEY2                    = 262144;
  307.  
  308. float    IT_INVISIBILITY            = 524288;
  309. float    IT_INVULNERABILITY        = 1048576;
  310. float    IT_SUIT                    = 2097152;
  311. float    IT_QUAD                    = 4194304;
  312.  
  313. // point content values
  314.  
  315. float    CONTENT_EMPTY            = -1;
  316. float    CONTENT_SOLID            = -2;
  317. float    CONTENT_WATER            = -3;
  318. float    CONTENT_SLIME            = -4;
  319. float    CONTENT_LAVA            = -5;
  320. float    CONTENT_SKY                = -6;
  321.  
  322. float    STATE_TOP        = 0;
  323. float    STATE_BOTTOM    = 1;
  324. float    STATE_UP        = 2;
  325. float    STATE_DOWN        = 3;
  326.  
  327. vector    VEC_ORIGIN = '0 0 0';
  328. vector    VEC_HULL_MIN = '-16 -16 -24';
  329. vector    VEC_HULL_MAX = '16 16 32';
  330.  
  331. vector    VEC_HULL2_MIN = '-32 -32 -24';
  332. vector    VEC_HULL2_MAX = '32 32 64';
  333.  
  334. // protocol bytes
  335. float    SVC_TEMPENTITY        = 23;
  336. float    SVC_KILLEDMONSTER    = 27;
  337. float    SVC_FOUNDSECRET        = 28;
  338. float    SVC_INTERMISSION    = 30;
  339. float    SVC_FINALE            = 31;
  340. float    SVC_CDTRACK            = 32;
  341. float    SVC_SELLSCREEN        = 33;
  342.  
  343.  
  344. float    TE_SPIKE        = 0;
  345. float    TE_SUPERSPIKE    = 1;
  346. float    TE_GUNSHOT        = 2;
  347. float    TE_EXPLOSION    = 3;
  348. float    TE_TAREXPLOSION    = 4;
  349. float    TE_LIGHTNING1    = 5;
  350. float    TE_LIGHTNING2    = 6;
  351. float    TE_WIZSPIKE        = 7;
  352. float    TE_KNIGHTSPIKE    = 8;
  353. float    TE_LIGHTNING3    = 9;
  354. float    TE_LAVASPLASH    = 10;
  355. float    TE_TELEPORT        = 11;
  356.  
  357. // sound channels
  358. // channel 0 never willingly overrides
  359. // other channels (1-7) allways override a playing sound on that channel
  360. float    CHAN_AUTO        = 0;
  361. float    CHAN_WEAPON        = 1;
  362. float    CHAN_VOICE        = 2;
  363. float    CHAN_ITEM        = 3;
  364. float    CHAN_BODY        = 4;
  365.  
  366. float    ATTN_NONE        = 0;
  367. float    ATTN_NORM        = 1;
  368. float    ATTN_IDLE        = 2;
  369. float    ATTN_STATIC        = 3;
  370.  
  371. // update types
  372.  
  373. float    UPDATE_GENERAL    = 0;
  374. float    UPDATE_STATIC    = 1;
  375. float    UPDATE_BINARY    = 2;
  376. float    UPDATE_TEMP        = 3;
  377.  
  378. // entity effects
  379.  
  380. float    EF_BRIGHTFIELD    = 1;
  381. float    EF_MUZZLEFLASH     = 2;
  382. float    EF_BRIGHTLIGHT     = 4;
  383. float    EF_DIMLIGHT     = 8;
  384.  
  385.  
  386. // messages
  387. float    MSG_BROADCAST    = 0;        // unreliable to all
  388. float    MSG_ONE            = 1;        // reliable to one (msg_entity)
  389. float    MSG_ALL            = 2;        // reliable to all
  390. float    MSG_INIT        = 3;        // write to the init string
  391.  
  392. //================================================
  393.  
  394. //
  395. // globals
  396. //
  397. float    movedist;
  398. float    gameover;        // set when a rule exits
  399.  
  400. string    string_null;    // null string, nothing should be held here
  401. float    empty_float;
  402.  
  403. entity    newmis;            // launch_spike sets this after spawning it
  404.  
  405. entity    activator;        // the entity that activated a trigger or brush
  406.  
  407. entity    damage_attacker;    // set by T_Damage
  408. float    framecount;
  409.  
  410. float        skill;
  411.  
  412. //================================================
  413.  
  414. //
  415. // world fields (FIXME: make globals)
  416. //
  417. .string        wad;
  418. .string     map;
  419. .float        worldtype;    // 0=medieval 1=metal 2=base
  420.  
  421. //================================================
  422.  
  423. .string        killtarget;
  424.  
  425. //
  426. // quakeed fields
  427. //
  428. .float        light_lev;        // not used by game, but parsed by light util
  429. .float        style;
  430.  
  431.  
  432. //
  433. // monster ai
  434. //
  435. .void()        th_stand;
  436. .void()        th_walk;
  437. .void()        th_run;
  438. .void()        th_missile;
  439. .void()        th_melee;
  440. .void(entity attacker, float damage)        th_pain;
  441. .void()        th_die;
  442.  
  443. .entity        oldenemy;        // mad at this player before taking damage
  444.  
  445. .float        speed;
  446.  
  447. .float    lefty;
  448.  
  449. .float    search_time;
  450. .float    attack_state;
  451.  
  452. float    AS_STRAIGHT        = 1;
  453. float    AS_SLIDING        = 2;
  454. float    AS_MELEE        = 3;
  455. float    AS_MISSILE        = 4;
  456.  
  457. //
  458. // player only fields
  459. //
  460. .float        walkframe;
  461.  
  462. .float         attack_finished;
  463. .float        pain_finished;
  464.  
  465. .float        invincible_finished;
  466. .float        invisible_finished;
  467. .float        super_damage_finished;
  468. .float        radsuit_finished;
  469.  
  470. .float        invincible_time, invincible_sound;
  471. .float        invisible_time, invisible_sound;
  472. .float        super_time, super_sound;
  473. .float        rad_time;
  474. .float        fly_sound;
  475.  
  476. .float        axhitme;
  477.  
  478. .float        show_hostile;    // set to time+0.2 whenever a client fires a
  479.                             // weapon or takes damage.  Used to alert
  480.                             // monsters that otherwise would let the player go
  481. .float        jump_flag;        // player jump flag
  482. .float        swim_flag;        // player swimming sound flag
  483. .float        air_finished;    // when time > air_finished, start drowning
  484. .float        bubble_count;    // keeps track of the number of bubbles
  485. .string        deathtype;        // keeps track of how the player died
  486.  
  487. //
  488. // object stuff
  489. //
  490. .string        mdl;
  491. .vector        mangle;            // angle at start
  492.  
  493. .vector        oldorigin;        // only used by secret door
  494.  
  495. .float        t_length, t_width;
  496.  
  497.  
  498. //
  499. // doors, etc
  500. //
  501. .vector        dest, dest1, dest2;
  502. .float        wait;            // time from firing to restarting
  503. .float        delay;            // time from activation to firing
  504. .entity        trigger_field;    // door's trigger entity
  505. .string        noise4;
  506.  
  507. //
  508. // monsters
  509. //
  510. .float         pausetime;
  511. .entity     movetarget;
  512.  
  513.  
  514. //
  515. // doors
  516. //
  517. .float        aflag;
  518. .float        dmg;            // damage done by door when hit
  519.     
  520. //
  521. // misc
  522. //
  523. .float        cnt;             // misc flag
  524.     
  525. //
  526. // subs
  527. //
  528. .void()        think1;
  529. .vector        finaldest, finalangle;
  530.  
  531. //
  532. // triggers
  533. //
  534. .float        count;            // for counting triggers
  535.  
  536.  
  537. //
  538. // plats / doors / buttons
  539. //
  540. .float        lip;
  541. .float        state;
  542. .vector        pos1, pos2;        // top and bottom positions
  543. .float        height;
  544.  
  545. //
  546. // sounds
  547. //
  548. .float        waitmin, waitmax;
  549. .float        distance;
  550. .float        volume;
  551.  
  552. //===========================================================================
  553.     
  554.  
  555. //
  556. // builtin functions
  557. //
  558.  
  559. void(vector ang)    makevectors        = #1;        // sets v_forward, etc globals
  560. void(entity e, vector o) setorigin    = #2;
  561. void(entity e, string m) setmodel    = #3;        // set movetype and solid first
  562. void(entity e, vector min, vector max) setsize = #4;
  563. // #5 was removed
  564. void() break                        = #6;
  565. float() random                        = #7;        // returns 0 - 1
  566. void(entity e, float chan, string samp, float vol, float atten) sound = #8;
  567. vector(vector v) normalize            = #9;
  568. void(string e) error                = #10;
  569. void(string e) objerror                = #11;
  570. float(vector v) vlen                = #12;
  571. float(vector v) vectoyaw            = #13;
  572. entity() spawn                        = #14;
  573. void(entity e) remove                = #15;
  574.  
  575. // sets trace_* globals
  576. // nomonsters can be:
  577. // An entity will also be ignored for testing if forent == test,
  578. // forent->owner == test, or test->owner == forent
  579. // a forent of world is ignored
  580. void(vector v1, vector v2, float nomonsters, entity forent) traceline = #16;    
  581.  
  582. entity() checkclient                = #17;    // returns a client to look for
  583. entity(entity start, .string fld, string match) find = #18;
  584. string(string s) precache_sound        = #19;
  585. string(string s) precache_model        = #20;
  586. void(entity client, string s)stuffcmd = #21;
  587. entity(vector org, float rad) findradius = #22;
  588. void(string s) bprint                = #23;
  589. void(entity client, string s) sprint = #24;
  590. void(string s) dprint                = #25;
  591. string(float f) ftos                = #26;
  592. string(vector v) vtos                = #27;
  593. void() coredump                        = #28;        // prints all edicts
  594. void() traceon                        = #29;        // turns statment trace on
  595. void() traceoff                        = #30;
  596. void(entity e) eprint                = #31;        // prints an entire edict
  597. float(float yaw, float dist) walkmove    = #32;    // returns TRUE or FALSE
  598. // #33 was removed
  599. float(float yaw, float dist) droptofloor= #34;    // TRUE if landed on floor
  600. void(float style, string value) lightstyle = #35;
  601. float(float v) rint                    = #36;        // round to nearest int
  602. float(float v) floor                = #37;        // largest integer <= v
  603. float(float v) ceil                    = #38;        // smallest integer >= v
  604. // #39 was removed
  605. float(entity e) checkbottom            = #40;        // true if self is on ground
  606. float(vector v) pointcontents        = #41;        // returns a CONTENT_*
  607. // #42 was removed
  608. float(float f) fabs = #43;
  609. vector(entity e, float speed) aim = #44;        // returns the shooting vector
  610. float(string s) cvar = #45;                        // return cvar.value
  611. void(string s) localcmd = #46;                    // put string into local que
  612. entity(entity e) nextent = #47;                    // for looping through all ents
  613. void(vector o, vector d, float color, float count) particle = #48;// start a particle effect
  614. void() ChangeYaw = #49;                        // turn towards self.ideal_yaw
  615.                                             // at self.yaw_speed
  616. // #50 was removed
  617. vector(vector v) vectoangles            = #51;
  618.  
  619. //
  620. // direct client message generation
  621. //
  622. void(float to, float f) WriteByte        = #52;
  623. void(float to, float f) WriteChar        = #53;
  624. void(float to, float f) WriteShort        = #54;
  625. void(float to, float f) WriteLong        = #55;
  626. void(float to, float f) WriteCoord        = #56;
  627. void(float to, float f) WriteAngle        = #57;
  628. void(float to, string s) WriteString    = #58;
  629. void(float to, entity s) WriteEntity    = #59;
  630.  
  631. //
  632. // broadcast client message generation
  633. //
  634.  
  635. // void(float f) bWriteByte        = #59;
  636. // void(float f) bWriteChar        = #60;
  637. // void(float f) bWriteShort        = #61;
  638. // void(float f) bWriteLong        = #62;
  639. // void(float f) bWriteCoord        = #63;
  640. // void(float f) bWriteAngle        = #64;
  641. // void(string s) bWriteString    = #65;
  642. // void(entity e) bWriteEntity = #66;
  643.  
  644. void(float step) movetogoal                = #67;
  645.  
  646. string(string s) precache_file        = #68;    // no effect except for -copy
  647. void(entity e) makestatic        = #69;
  648. void(string s) changelevel = #70;
  649.  
  650. //#71 was removed
  651.  
  652. void(string var, string val) cvar_set = #72;    // sets cvar.value
  653.  
  654. void(entity client, string s) centerprint = #73;    // sprint, but in middle
  655.  
  656. void(vector pos, string samp, float vol, float atten) ambientsound = #74;
  657.  
  658. string(string s) precache_model2    = #75;        // registered version only
  659. string(string s) precache_sound2    = #76;        // registered version only
  660. string(string s) precache_file2        = #77;        // registered version only
  661.  
  662. void(entity e) setspawnparms        = #78;        // set parm1... to the
  663.                                                 // values at level start
  664.                                                 // for coop respawn
  665.  
  666. //============================================================================
  667.  
  668. //
  669. // subs.qc
  670. //
  671. void(vector tdest, float tspeed, void() func) SUB_CalcMove;
  672. void(entity ent, vector tdest, float tspeed, void() func) SUB_CalcMoveEnt;
  673. void(vector destangle, float tspeed, void() func) SUB_CalcAngleMove;
  674. void() SUB_CalcMoveDone;
  675. void() SUB_CalcAngleMoveDone;
  676. void() SUB_Null;
  677. void() SUB_UseTargets;
  678. void() SUB_Remove;
  679.  
  680. //
  681. //    combat.qc
  682. //
  683. void(entity targ, entity inflictor, entity attacker, float damage) T_Damage;
  684.  
  685.  
  686. float (entity e, float healamount, float ignore) T_Heal; // health function
  687.  
  688. float(entity targ, entity inflictor) CanDamage;
  689.  
  690.  
  691. //===========================================================================
  692. // TEAMFORTRESS Defs
  693. //===========================================================================\
  694. .float      playerclass;        
  695. .float        last_impulse;        // The previous impulse command from this player
  696. .float        armorclass;            // Type of armor being worn
  697. .float         tf_items;            // Another flag for player items
  698. .float        tf_items_flags;        // Flags for the player items
  699. .float        no_grenades_1;        // Number of grenades of type 1 being carried
  700. .float        no_grenades_2;        // Number of grenades of type 2 being carried
  701. .float        tp_grenades_1;        // 1st type of grenades being carried
  702. .float        tp_grenades_2;        // 2nd type of grenades being carried
  703.  
  704. // TeamFortress State Flags
  705. .float         tfstate;            // State flags for TeamFortress
  706. float         TFSTATE_GRENPRIMED= 1;    // Whether the player has a primed grenade
  707. float         TFSTATE_RELOADING = 2;    // Whether the player is reloading
  708. float        TFSTATE_ALTKILL   = 4;     // TRUE if killed with a weapon not in self.weapon
  709. float        TFSTATE_RANDOMPC  = 8;  // Whether Playerclass is random, new one each respawn
  710. float        TFSTATE_INFECTED  = 16;    // set when player is infected by the bioweapon
  711. .entity        linked_list;        // Used just like chain. Has to be separate so
  712.                                 // it doesn't interfere with chain. See T_RadiusScan
  713. .entity        observer_list;        // Used by undefined classes, see TF_MovePlayer
  714. float        TF_TD_IGNOREARMOUR = 1; // Bypasses the armour of the target
  715. float          TF_TD_NOTTEAM      = 2; // Doesn't damage a team member
  716. float         TF_TD_NOTSELF       = 4; // Doesn't damage self
  717.                                     // See TF_T_Damage (in combat.qc)
  718.  
  719. // Playerclass handling variables
  720. .float        maxammo_shells;        // Class holding details
  721. .float        maxammo_nails;
  722. .float        maxammo_cells;
  723. .float        maxammo_rockets;
  724. .float        items_allowed;
  725. .float        secondary_items_allowed;
  726. .float        armor_allowed;
  727. .float         maxarmor;
  728. .float        maxfbspeed;            // Maximum forward/back speed
  729. .float        maxstrafespeed;        // Maximum side speed
  730.  
  731. .float        weaponmode;            // Used for multiple mode weapons
  732.  
  733. .float        altkillweapon;        // ID of the weapon killed by if TFSTATE_ALTKILL is TRUE
  734.  
  735. .float        motd;                 // Used to display MOTD
  736.  
  737. /*==================================================*/
  738. /* Toggleable Game Settings                            */
  739. /*==================================================*/
  740. float toggleflags;                        // toggleable flags
  741. float TFLAG_SKIN             = 1;        // Classkin/Multiskin Bit
  742. float TFLAG_CLASS_PERSIST    = 2;         // Persistent Classes Bit
  743. float TFLAG_CHEATCHECK        = 4;        // Cheatchecking Bit
  744. float TFLAG_FORTRESSMAP        = 8;        // FortressMap Bit
  745. float TFLAG_RESPAWNDELAY    = 16;        // RespawnDelay bit
  746. float TFLAG_RESPAWNDELAY2    = 32;        // extra delay options
  747. float TFLAG_AUTOTEAM        = 64;        // sets whether players are automatically placed in teams
  748. float TFLAG_FIRSTENTRY        = 256;        // Used to determine the first time toggleflags is set
  749.                                         // In a map. Cannot be toggled by players.
  750.  
  751. float TF_RESPAWNDELAY1    = 5;    // seconds of waiting before player can respawn
  752. float TF_RESPAWNDELAY2    = 10;    // seconds of waiting before player can respawn
  753. float TF_RESPAWNDELAY3    = 20;    // seconds of waiting before player can respawn
  754.  
  755. // FortressMap stuff
  756. float team1col;        // Colours for each of the 4 teams
  757. float team2col;        // If there's enough demand, we'll
  758. float team3col;        // allow more than four teams...
  759. float team4col;
  760. float team1score;    // Goal Score of each team
  761. float team2score;    
  762. float team3score;    
  763. float team4score;    
  764. .float team_no;        // The team you belong to
  765.  
  766. // Defines for the playerclass
  767. float PC_UNDEFINED  = 0;
  768.  
  769. float PC_SCOUT      = 1;
  770. float PC_SNIPER     = 2;
  771. float PC_SOLDIER    = 3;
  772. float PC_DEMOMAN    = 4;
  773. float PC_MEDIC      = 5;
  774. float PC_HVYWEAP    = 6;
  775.                 
  776. // PC_RANDOM _MUST_ be the second last class
  777. float PC_RANDOM        = 7;        // Random playerclass
  778. float PC_LASTCLASS  = 8;        // Use this as the high-boundary for any loops
  779.                                 // through the playerclass.
  780.  
  781. /*==================================================*/
  782. /* Impulse Defines                                    */
  783. /*==================================================*/
  784. // defines for the impulse commands : Added to PC_??? to get impulse to use
  785. // if this clashes with your own impulses, just change this value, not the PC_??
  786. float TF_CHANGEPC    = 100;
  787.  
  788. // The Pre-impulse for help
  789. float TF_HELP                = 254;
  790. float TF_HELP_GENERAL         = 1;
  791. float TF_HELP_CLASS             = 2;
  792. float TF_HELP_WEAPON         = 3;
  793. float TF_HELP_ITEM             = 4;
  794. float TF_HELP_PREIMP         = 5;
  795. float TF_HELP_PREIMP_SHOW    = 6;
  796. float TF_HELP_SKIN             = 7;
  797. float TF_HELP_IMP_SHOW        = 8;
  798. float TF_HELP_TEAM            = 9;
  799. float TF_HELP_TOGGLE        = 10;
  800.  
  801. float TF_INVENTORY            = 253;
  802. float TF_SHOWTF                = 244;
  803.  
  804. // Team Impulses
  805. float TF_TEAM                = 245;  // Pre-impulse for Team functions
  806. float TF_TEAM_SCORES        = 253;  // Impulse to display team scores
  807. float TF_TEAM_LIST            = 254;  // Impulse to display the players in each team.
  808.                                     // Team impulses need to start at the top, since the
  809.                                     // range of values from 1-TM_MAX_NO are used to set the player's team.
  810.  
  811. // Grenade Impulses
  812. float TF_GRENADE_1    = 252;        // Prime grenade type 1
  813. float TF_GRENADE_2    = 251;        // Prime grenade type 2
  814. float TF_GRENADE_T    = 250;        // Throw primed grenade
  815.  
  816. // Multiskin Impulses
  817. float TF_MULTISKIN    = 202;        // Multiskin Pre-Impulse
  818. float TF_SKIN_NEXT    = 200;        // If Multiskin is on, these cycle
  819. float TF_SKIN_PREV    = 201;        // through the skins.
  820.  
  821. // Impulses for new items
  822. float TF_SCAN            = 249;        // Pre-impulse for scanner
  823. float TF_SCAN_ENEMY     = 1;        // } Impulses to toggle scanning of these entity types
  824. float TF_SCAN_FRIENDLY  = 2;        // } Like all scanner impulses, they only work after the Pre-Impulse
  825. float TF_DETPACK        = 248;        // Pre-impulse for Detpack
  826. float TF_PB_DETONATE    = 247;        // Detonate Pipebombs
  827.  
  828. // Alias check to see whether they already have the aliases
  829. float TF_ALIAS_CHECK    = 13;
  830.  
  831. /*==================================================*/
  832. /* Team Defines                                        */
  833. /*==================================================*/
  834. float TM_MAX_NO        = 4;        // Max number of teams. Simply changing this value isn't enough.
  835.                                 // A new global to hold new team colors is needed, and more flags
  836.                                 // in the spawnpoint spawnflags may need to be used.
  837.                                 // Basically, don't change this unless you know what you're doing :)
  838.  
  839. /*==================================================*/
  840. /* Toggleable Game Seting Defines                    */
  841. /*==================================================*/
  842. float TF_TOGGLE                    = 246;        // Toggle Pre-Impulse
  843. float TF_TOGGLE_SKIN            = 1;        // Toggle skin setting
  844. float TF_TOGGLE_CLASS_PERSIST    = 2;        // Toggle Class Persistence between lvls 
  845. float TF_TOGGLE_CHEATCHECK        = 3;        // Toggle Checking for cheats
  846. float TF_TOGGLE_FORTRESSMAP        = 4;        // Toggle usage of FortressMap. (See the readme.txt)
  847. float TF_TOGGLE_RESPAWNDELAY    = 5;        // Toggle usages
  848. float TF_TOGGLE_AUTOTEAM        = 6;        // Toggle automatic placement of players in teams
  849.  
  850. /*==================================================*/
  851. /* New Weapon Defines                                */
  852. /*==================================================*/
  853. float NIT_SNIPER_RIFLE      = 1;
  854. float NIT_AUTO_RIFLE         = 2;
  855. float NIT_MEDIKIT            = 4;
  856. float NIT_DETPACK            = 8;
  857. float NIT_ASSAULT_CANNON    = 16;
  858. float NIT_BIOWEAPON            = 32;
  859.  
  860. /*==================================================*/
  861. /* New Weapon Related Defines                        */
  862. /*==================================================*/
  863. // shots per reload - 1
  864. float RE_SHOTGUN             = 7;
  865. float RE_SUPER_SHOTGUN      = 7;
  866. //float RE_NAILGUN             = 39;
  867. //float RE_SUPER_NAILGUN     = 39;
  868. float RE_GRENADE_LAUNCHER     = 5;
  869. float RE_ROCKET_LAUNCHER     = 3;
  870.  
  871. // reload times
  872. float RE_SHOTGUN_TIME             = 2;
  873. float RE_SUPER_SHOTGUN_TIME     = 3;
  874. //float RE_NAILGUN_TIME         = 4;
  875. //float RE_SUPER_NAILGUN_TIME     = 6;
  876. float RE_GRENADE_LAUNCHER_TIME     = 4;
  877. float RE_ROCKET_LAUNCHER_TIME     = 5;
  878. float RE_ASSAULT_CANNON_TIME    = 6;
  879.  
  880. // Maximum velocity you can move and fire the Sniper Rifle
  881. float NIT_SNIPER_RIFLE_MAX_MOVE = 50;
  882.  
  883. // Amount medikit heals per hit
  884. float NIT_MEDIKIT_HEAL = 10;
  885. .float ammo_medikit;            // Ammo used for the NIT_MEDIKIT
  886. .float maxammo_medikit;
  887.  
  888. // Time taken to set a Detpack
  889. float NIT_DETPACK_SETTIME = 4;    // Time it takes to set a Detpack
  890. float NIT_DETPACK_SIZE    = 2000;
  891. .float ammo_detpack;
  892. .float maxammo_detpack;
  893.  
  894. // Grenades
  895. float GR_PRIMETIME          = 3;
  896. float GR_TYPE_NONE         = 0;
  897. float GR_TYPE_NORMAL     = 1;
  898. float GR_TYPE_CONCUSSION = 2;
  899. float GR_TYPE_NAIL         = 3;
  900. float GR_TYPE_MIRV         = 4;
  901.  
  902. float GR_TYPE_MIRV_NO     = 15;    // Number of Mirvs a Mirv Grenade breaks into
  903.  
  904. // Defines for WeaponMode
  905. float GL_NORMAL             = 0;
  906. float GL_PIPEBOMB         = 1;
  907.  
  908. // Defines for Alternative Weapon Kill
  909. float AK_GRENADE         = 0;
  910. float AK_GRENADE_NAIL     = 1;
  911. float AK_GRENADE_MIRV     = 2;
  912. float AK_DETPACK         = 3;
  913. float AK_BIOWEAPON         = 4;
  914. float AK_MISSILE         = 5;
  915. float AK_ORG_GRENADE     = 6;
  916.  
  917. // Defines for Concussion Grenade
  918. float GR_CONCUSS_TIME     = 5;
  919. float GR_CONCUSS_DEC     = 20;
  920.  
  921. /*==================================================*/
  922. /* New Items                                        */
  923. /*==================================================*/
  924. float NIT_SCANNER    = 1;
  925.  
  926. /*==================================================*/
  927. /* New Item Flags                                    */
  928. /*==================================================*/
  929. float NIT_SCANNER_ENEMY        = 1;    // Detect enemies
  930. float NIT_SCANNER_FRIENDLY    = 2;    // Detect friendlies (team members)
  931. float NIT_SCANNER_MOVEMENT    = 4;    // Motion detection. Only report moving entities.
  932.  
  933. /*==================================================*/
  934. /* New Item Related Defines                            */
  935. /*==================================================*/
  936. float NIT_SCANNER_POWER            = 50;    // The amount of power spent on a scan with the scanner
  937.                                         // is multiplied by this to get the scanrange.
  938. float NIT_SCANNER_MAXCELL        = 50;    // The maximum number of cells than can be used in one scan
  939. float NIT_SCANNER_MIN_MOVEMENT    = 50;    // The minimum velocity an entity must have to be detected
  940.                                         // by scanners that only detect movement
  941.  
  942. /*==================================================*/
  943. /* Variables used for New Weapons and Reloading     */
  944. /*==================================================*/
  945.                            // used only when .weapon == IT_EXTRA_WEAPON
  946. .float secondary_items;    // contains all the additional weapons
  947. .float secondary_weapon;    // contains the currently used secondary weapon
  948.  
  949. .float reload_shotgun;
  950. .float reload_super_shotgun;
  951. //.float reload_nailgun;
  952. //.float reload_super_nailgun;
  953. .float reload_grenade_launcher;
  954. .float reload_rocket_launcher;
  955.  
  956. // Assault Cannon
  957. .float heat;
  958.  
  959. // Team Color Cheat Checking
  960. .float immune_to_check;
  961.  
  962. // Armor Classes : Use the spawnflags for the Armor Type.
  963. float AT_NORMAL                    = 1792;      // Default spawnflags for Armor. armorclass = 0 for this armor
  964. float AT_SAVESHOT                = 32768;  // Kevlar       : Reduces shotgun damage by 25%
  965. float AT_SAVENAIL                = 65536;  // Wood :)      : Reduces nail damage by 25%
  966. float AT_SAVEEXPLOSION            = 131072; // Blast        : Reduces explosion damage by 25%
  967. float AT_SAVESHOTNAIL            = 262144; // Adamantite  : Reduces nail and shotgun damage by 10%
  968.  
  969. // Class Details for SCOUT
  970. float PC_SCOUT_SKIN                = 26;        // Skin for this class when Classkin is on.
  971. float PC_SCOUT_MAXHEALTH        = 75;        // Maximum Health Level
  972. float PC_SCOUT_MAXSPEED            = 600;        // Maximum movement speed
  973. float PC_SCOUT_MAXSTRAFESPEED    = 600;        // Maximum strafing movement speed
  974. float PC_SCOUT_MAXARMOR            = 50;        // Maximum Armor Level, of any armor class
  975. float PC_SCOUT_INITARMOR         = 25;        // Armor level when respawned
  976. float PC_SCOUT_MAXARMORTYPE        = 0.3;        // Maximum level of Armor absorption
  977. float PC_SCOUT_INITARMORTYPE     = 0.3;        // Absorption Level of armor when respawned
  978. float PC_SCOUT_ARMORCLASSES        = 98304;    // AT_SAVESHOT | AT_SAVENAIL           <-Armor Classes allowed for this class
  979. float PC_SCOUT_INITARMORCLASS    = 0;        // Armorclass worn when respawned
  980. float PC_SCOUT_WEAPONS            = 4101;        // IT_AXE | IT_SHOTGUN | IT_NAILGUN; <- Weapons allowed
  981. float PC_SCOUT_MAXAMMO_SHOT        = 50;        // Maximum amount of shot ammo this class can carry
  982. float PC_SCOUT_MAXAMMO_NAIL        = 200;        // Maximum amount of nail ammo this class can carry
  983. float PC_SCOUT_MAXAMMO_CELL        = 100;        // Maximum amount of cell ammo this class can carry
  984. float PC_SCOUT_MAXAMMO_ROCKET    = 0;        // Maximum amount of rocket ammo this class can carry
  985. float PC_SCOUT_INITAMMO_SHOT    = 25;        // Amount of shot ammo this class has when respawned
  986. float PC_SCOUT_INITAMMO_NAIL    = 100;        // Amount of nail ammo this class has when respawned
  987. float PC_SCOUT_INITAMMO_CELL    = 50;        // Amount of cell ammo this class has when respawned
  988. float PC_SCOUT_INITAMMO_ROCKET    = 0;        // Amount of rocket ammo this class has when respawned
  989. float PC_SCOUT_GRENADE_TYPE_1    = 1;        // GR_TYPE_NORMAL                     <- 1st Type of Grenade this class has
  990. float PC_SCOUT_GRENADE_TYPE_2    = 2;        // GR_TYPE_CONCUSSION                 <- 2nd Type of Grenade this class has
  991. float PC_SCOUT_GRENADE_INIT_1    = 2;        // Number of grenades of Type 1 this class has when respawned
  992. float PC_SCOUT_GRENADE_INIT_2    = 2;        // Number of grenades of Type 2 this class has when respawned
  993. float PC_SCOUT_TF_ITEMS            = 1;        // NIT_SCANNER        <- TeamFortress Items this class has
  994.  
  995. float PC_SCOUT_MOTION_MIN_I        = 0.5;        // < Short range
  996. float PC_SCOUT_MOTION_MIN_MOVE    = 50;        // Minimum vlen of player velocity to be picked up by motion detector
  997.  
  998. // Class Details for SNIPER
  999. float PC_SNIPER_SKIN            = 2;
  1000. float PC_SNIPER_MAXHEALTH       = 90;
  1001. float PC_SNIPER_MAXSPEED        = 300;        
  1002. float PC_SNIPER_MAXSTRAFESPEED    = 300;
  1003. float PC_SNIPER_MAXARMOR         = 50;
  1004. float PC_SNIPER_INITARMOR         = 0;
  1005. float PC_SNIPER_MAXARMORTYPE    = 0.3;
  1006. float PC_SNIPER_INITARMORTYPE     = 0.3;
  1007. float PC_SNIPER_ARMORCLASSES    = 360448;    // AT_SAVESHOT | AT_SAVENAIL | AT_SAVESHOTNAIL
  1008. float PC_SNIPER_INITARMORCLASS    = 0;
  1009. float PC_SNIPER_WEAPONS            = 4228;     // IT_EXTRA_WEAPON | IT_AXE | IT_NAILGUN;
  1010. float PC_SNIPER_MAXAMMO_SHOT    = 75;
  1011. float PC_SNIPER_MAXAMMO_NAIL    = 100;
  1012. float PC_SNIPER_MAXAMMO_CELL    = 0;
  1013. float PC_SNIPER_MAXAMMO_ROCKET    = 0;
  1014. float PC_SNIPER_INITAMMO_SHOT    = 50;
  1015. float PC_SNIPER_INITAMMO_NAIL    = 50;
  1016. float PC_SNIPER_INITAMMO_CELL    = 0;
  1017. float PC_SNIPER_INITAMMO_ROCKET    = 0;
  1018. float PC_SNIPER_GRENADE_TYPE_1    = 1;         // GR_TYPE_NORMAL
  1019. float PC_SNIPER_GRENADE_TYPE_2    = 0;     
  1020. float PC_SNIPER_GRENADE_INIT_1    = 2;     
  1021. float PC_SNIPER_GRENADE_INIT_2    = 0;     
  1022. float PC_SNIPER_TF_ITEMS        = 0;
  1023.  
  1024. // Class Details for SOLDIER
  1025. float PC_SOLDIER_SKIN            = 6;
  1026. float PC_SOLDIER_MAXHEALTH      = 100;
  1027. float PC_SOLDIER_MAXSPEED        = 200;        
  1028. float PC_SOLDIER_MAXSTRAFESPEED    = 200;
  1029. float PC_SOLDIER_MAXARMOR         = 200;
  1030. float PC_SOLDIER_INITARMOR         = 100;
  1031. float PC_SOLDIER_MAXARMORTYPE    = 0.8;
  1032. float PC_SOLDIER_INITARMORTYPE     = 0.8;
  1033. float PC_SOLDIER_ARMORCLASSES    = 491520;    // AT_SAVESHOT | AT_SAVENAIL | AT_SAVEEXPLOSION | AT_SAVESHOTNAIL
  1034. float PC_SOLDIER_INITARMORCLASS    = 0;
  1035. float PC_SOLDIER_WEAPONS         = 4139;     // IT_AXE | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_SUPER_NAILGUN | IT_ROCKET_LAUNCHER;
  1036. float PC_SOLDIER_MAXAMMO_SHOT    = 100;
  1037. float PC_SOLDIER_MAXAMMO_NAIL    = 200;
  1038. float PC_SOLDIER_MAXAMMO_CELL    = 100;
  1039. float PC_SOLDIER_MAXAMMO_ROCKET    = 50;
  1040. float PC_SOLDIER_INITAMMO_SHOT    = 50;
  1041. float PC_SOLDIER_INITAMMO_NAIL    = 100;
  1042. float PC_SOLDIER_INITAMMO_CELL    = 50;
  1043. float PC_SOLDIER_INITAMMO_ROCKET= 10;
  1044. float PC_SOLDIER_GRENADE_TYPE_1    = 1;         // GR_TYPE_NORMAL
  1045. float PC_SOLDIER_GRENADE_TYPE_2    = 3;         // GR_TYPE_NAIL
  1046. float PC_SOLDIER_GRENADE_INIT_1    = 4;     
  1047. float PC_SOLDIER_GRENADE_INIT_2    = 4;     
  1048. float PC_SOLDIER_TF_ITEMS        = 0;
  1049.  
  1050. // Class Details for DEMOLITION MAN
  1051. float PC_DEMOMAN_SKIN             = 22;
  1052. float PC_DEMOMAN_MAXHEALTH       = 90;
  1053. float PC_DEMOMAN_MAXSPEED         = 300;        
  1054. float PC_DEMOMAN_MAXSTRAFESPEED     = 300;
  1055. float PC_DEMOMAN_MAXARMOR          = 100;
  1056. float PC_DEMOMAN_INITARMOR          = 50;
  1057. float PC_DEMOMAN_MAXARMORTYPE      = 0.6;
  1058. float PC_DEMOMAN_INITARMORTYPE      = 0.6;
  1059. float PC_DEMOMAN_ARMORCLASSES     = 491520;    // AT_SAVESHOT | AT_SAVENAIL | AT_SAVEEXPLOSION | AT_SAVESHOTNAIL
  1060. float PC_DEMOMAN_INITARMORCLASS     = 0;
  1061. float PC_DEMOMAN_WEAPONS         = 4113;     // IT_AXE | IT_SHOTGUN | IT_GRENADE_LAUNCHER;
  1062. float PC_DEMOMAN_MAXAMMO_SHOT     = 75;
  1063. float PC_DEMOMAN_MAXAMMO_NAIL     = 0;
  1064. float PC_DEMOMAN_MAXAMMO_CELL     = 0;
  1065. float PC_DEMOMAN_MAXAMMO_ROCKET     = 50;
  1066. float PC_DEMOMAN_MAXAMMO_DETPACK = 2;
  1067. float PC_DEMOMAN_INITAMMO_SHOT     = 30;
  1068. float PC_DEMOMAN_INITAMMO_NAIL     = 0;
  1069. float PC_DEMOMAN_INITAMMO_CELL     = 0;
  1070. float PC_DEMOMAN_INITAMMO_ROCKET = 20;
  1071. float PC_DEMOMAN_INITAMMO_DETPACK= 1;
  1072. float PC_DEMOMAN_GRENADE_TYPE_1     = 1;         // GR_TYPE_NORMAL
  1073. float PC_DEMOMAN_GRENADE_TYPE_2     = 4;         // GR_TYPE_MIRV
  1074. float PC_DEMOMAN_GRENADE_INIT_1     = 6;     
  1075. float PC_DEMOMAN_GRENADE_INIT_2     = 4;     
  1076. float PC_DEMOMAN_TF_ITEMS         = 0;
  1077.  
  1078. // Class Details for COMBAT MEDIC
  1079. float PC_MEDIC_SKIN                = 15;
  1080. float PC_MEDIC_MAXHEALTH        = 90;
  1081. float PC_MEDIC_MAXSPEED            = 300;
  1082. float PC_MEDIC_MAXSTRAFESPEED    = 300;
  1083. float PC_MEDIC_MAXARMOR             = 150;
  1084. float PC_MEDIC_INITARMOR          = 50;
  1085. float PC_MEDIC_MAXARMORTYPE        = 0.6;
  1086. float PC_MEDIC_INITARMORTYPE     = 0.6;
  1087. float PC_MEDIC_ARMORCLASSES        = 360448;    // AT_SAVESHOT | AT_SAVENAIL | AT_SAVESHOTNAIL
  1088. float PC_MEDIC_INITARMORCLASS    = 0;
  1089. float PC_MEDIC_WEAPONS            = 139;        // IT_EXTRA_WEAPON | IT_SHOTGUN | IT_SUPER_SHOTGUN | IT_SUPER_NAILGUN;
  1090. float PC_MEDIC_MAXAMMO_SHOT        = 75;
  1091. float PC_MEDIC_MAXAMMO_NAIL        = 150;
  1092. float PC_MEDIC_MAXAMMO_CELL        = 0;
  1093. float PC_MEDIC_MAXAMMO_ROCKET    = 0;
  1094. float PC_MEDIC_MAXAMMO_MEDIKIT    = 100;
  1095. float PC_MEDIC_INITAMMO_SHOT    = 50;
  1096. float PC_MEDIC_INITAMMO_NAIL    = 50;
  1097. float PC_MEDIC_INITAMMO_CELL    = 0;
  1098. float PC_MEDIC_INITAMMO_ROCKET    = 0;
  1099. float PC_MEDIC_INITAMMO_MEDIKIT    = 50;
  1100. float PC_MEDIC_GRENADE_TYPE_1    = 1;         // GR_TYPE_NORMAL
  1101. float PC_MEDIC_GRENADE_TYPE_2    = 2;         // GR_TYPE_CONCUSSION
  1102. float PC_MEDIC_GRENADE_INIT_1    = 3;     
  1103. float PC_MEDIC_GRENADE_INIT_2    = 2;     
  1104. float PC_MEDIC_TF_ITEMS            = 0;
  1105. float PC_MEDIC_REGEN_TIME        = 5;        // Number of seconds between each regen.
  1106. float PC_MEDIC_REGEN_AMOUNT        = 5;        // Amount of health regenerated each regen.
  1107.  
  1108. // Class Details for HVYWEAP
  1109. float PC_HVYWEAP_SKIN            = 29;
  1110. float PC_HVYWEAP_MAXHEALTH      = 100;
  1111. float PC_HVYWEAP_MAXSPEED        = 150;        
  1112. float PC_HVYWEAP_MAXSTRAFESPEED    = 150;
  1113. float PC_HVYWEAP_MAXARMOR         = 300;
  1114. float PC_HVYWEAP_INITARMOR         = 150;
  1115. float PC_HVYWEAP_MAXARMORTYPE    = 0.8;
  1116. float PC_HVYWEAP_INITARMORTYPE     = 0.8;
  1117. float PC_HVYWEAP_ARMORCLASSES    = 491520;    // AT_SAVESHOT | AT_SAVENAIL | AT_SAVEEXPLOSION | AT_SAVESHOTNAIL
  1118. float PC_HVYWEAP_INITARMORCLASS    = 0;
  1119. float PC_HVYWEAP_WEAPONS        = 4227;     // IT_EXTRA_WEAPON | IT_AXE | IT_SHOTGUN | IT_SUPER_SHOTGUN
  1120. float PC_HVYWEAP_MAXAMMO_SHOT    = 200;
  1121. float PC_HVYWEAP_MAXAMMO_NAIL    = 200;
  1122. float PC_HVYWEAP_MAXAMMO_CELL    = 50;
  1123. float PC_HVYWEAP_MAXAMMO_ROCKET    = 0;
  1124. float PC_HVYWEAP_INITAMMO_SHOT    = 200;
  1125. float PC_HVYWEAP_INITAMMO_NAIL    = 100;
  1126. float PC_HVYWEAP_INITAMMO_CELL    = 20;
  1127. float PC_HVYWEAP_INITAMMO_ROCKET= 0;
  1128. float PC_HVYWEAP_GRENADE_TYPE_1    = 1;         // GR_TYPE_NORMAL
  1129. float PC_HVYWEAP_GRENADE_TYPE_2    = 4;         // GR_TYPE_MIRV
  1130. float PC_HVYWEAP_GRENADE_INIT_1    = 4;     
  1131. float PC_HVYWEAP_GRENADE_INIT_2    = 1;     
  1132. float PC_HVYWEAP_TF_ITEMS        = 0;
  1133.  
  1134. /*==========================================================================*/
  1135. /* TEAMFORTRESS GOALS                                                        */
  1136. /*==========================================================================*/
  1137. // For all these defines, see the tfortmap.txt that came with the zip
  1138. // for complete descriptions.
  1139. // Defines for Goal Activation types : goal_activation (in goals)
  1140. float TFGA_TOUCH            = 1; // Activated when touched
  1141. float TFGA_TOUCH_DETPACK    = 2; // Activated when touched by a detpack explosion
  1142. float TFGA_ITEM                = 4; // Activating player must have a specific GoalItem    : items_allowed
  1143. float TFGA_CLASS            = 8; // Activating player must be of a specific class    : playerclass
  1144. float TFGA_TEAM                =16; // Activating player must be of a specific team    : teamno
  1145. float TFGA_TIMER_GOAL        =32; // This is a Timer Goal.                            : search_time
  1146.  
  1147. // Defines for Goal Result types : goal_result
  1148. float TFGR_SINGLE            =   1;     // Goal can only be activated once
  1149. float TFGR_RESPAWN            =   2;     // Goal respawns after a time
  1150. float TFGR_ITEM                =   4;     // Goal gives the player a GoalItem                : items
  1151. float TFGR_ITEM_REMOVE        =   8;    // Goal removes an item from the player            : axhitme
  1152. float TFGR_GOAL_ACTIVATE    =  16;    // Goal activates another goal                    : impulse
  1153. float TFGR_GOAL_INACTIVATE  =  32;    // Goal makes another goal inactive                : distance
  1154. float TFGR_GOAL_REMOVE        =  64;    // Goal removes a goal                            : waitmin
  1155. float TFGR_GOAL_RESTORE        = 128;    // Goal restores a goal                            : waitmax
  1156. float TFGR_NO_ACT_BONUS        = 256;    // Any Goals activated by this one don't give their bonuses
  1157. float TFGR_ENDGAME            = 512;    // Goal fires Intermission, displays scores, and ends level
  1158.  
  1159. // Defines for Goal Group Result types : goal_group
  1160. float TFGG_ACTIVATE            = 1; // If all goals is a group are active, Activate another Goal : height, last_impulse
  1161. float TFGG_ACTIVATE_ALL        = 2; // Activate all goals in a group    :  aflag
  1162. float TFGG_INACTIVATE_ALL    = 4; // Inactivate all goals in a group    :  dmg
  1163. float TFGG_REMOVE_ALL        = 8; // Remove all goals in a group        :  cnt
  1164. float TFGG_RESTORE_ALL        =16; // Restore all goals in a group    :  pausetime
  1165.  
  1166. // Defines for Goal Item types, : goal_activation (in items)
  1167. float TFGI_GLOW                =   1; // Players carrying this GoalItem will glow
  1168. float TFGI_SLOW                =   2; // Players carrying this GoalItem will move at half-speed
  1169. float TFGI_DROP                =   4; // Players dying with this item will drop it
  1170. float TFGI_RETURN_DROP        =   8; // Return if a player with it dies
  1171. float TFGI_RETURN_GOAL        =  16; // Return if a player with it has it removed by a goal's activation
  1172. float TFGI_RETURN_REMOVE    =  32; // Return if it is removed by TFGI_REMOVE
  1173. float TFGI_RESTORE_GOAL        =  64; // Restore a goal when this item is returned            : impulse
  1174. float TFGI_ITEM                = 128; // Collecting player must have a specific GoalItem    : items_allowed
  1175. float TFGI_CLASS            = 256; // Collecting player must be of a specific class        : playerclass
  1176. float TFGI_TEAM                = 512; // Collecting player must be of a specific team        : teamno
  1177. float TFGI_NOEXIST            =1024; // Doesn't exist until given to a player. 
  1178. float TFGI_REMOVE            =2048; // Remove if left untouched for 2 minutes after being dropped
  1179.  
  1180. // Defines for Goal States
  1181. float TFGS_ACTIVE            = 1;
  1182. float TFGS_INACTIVE            = 2;
  1183. float TFGS_REMOVED            = 3;
  1184.  
  1185. // Variables used in the Goals
  1186. .float goal_no;                // Goal number of this goal
  1187. .float group_no;             // Goal group this goal is in
  1188. .float goal_state;            // State of this goal
  1189.  
  1190. // Goal Activation details
  1191. .float goal_activation;        // Bitfields. Determines how this goal is activated
  1192. .float goal_result;            // Bitfields. Determines the results of activation
  1193. .float goal_group;            // Bitfields. Determines how groups are affected by activation of this goal
  1194.  
  1195. // global, number of teams supported by the map
  1196. float number_of_teams;
  1197.  
  1198. /*==================================================*/
  1199. /* Multiskin Defines                                */
  1200. /*==================================================*/
  1201. // Whenever you download a newer version of Multiskin with
  1202. // more skins, change this value to the number of skins
  1203. // in the new player.mdl
  1204. float MS_MAX_SKIN    = 32;
  1205.  
  1206. /*==================================================*/
  1207. /* Server Details                                    */
  1208. /*==================================================*/
  1209. // if you're going to run this as a server on the net,
  1210. // you may want to change this value of this variable to 1.
  1211. // This will make TeamFortress only use files which come
  1212. // with quake.
  1213. float IS_NET_SERVER    = 0;
  1214.